﻿<%@ Page Title="Liên hệ" Language="vb" AutoEventWireup="false" MasterPageFile="~/Master/OutSite.Master" CodeBehind="ContactUs.aspx.vb" Inherits="Core.ContactUs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<style>
    .toast-position-top-right {top:90px;}
</style>
<script>
    // DEV environtment is: ctl00_ContentPlaceHolder1_txtPhone
    // PRODUCTION environtment is: ContentPlaceHolder1_txtName
    var pre;
    //pre = "ctl00_ContentPlaceHolder1_";   // for DEV
    pre = "ContentPlaceHolder1_";   // for PRODUCT

    function chkSubmit() {
        filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
        if ($("#" + pre + "txtName").val() == '') {
            $().toastmessage('showErrorToast', "Bạn phải nhập tên đầy đủ...");
            return false;
        }
        if ($("#" + pre + "txtEmail").val() == '') {
            $().toastmessage('showErrorToast', "Bạn phải nhập Email...");
            return false;
        }
        if (!filter.test($("#" + pre + "txtEmail").val())) {
            $().toastmessage('showErrorToast', "Email bạn nhập chưa hợp lệ...");
            return false;
        }
        if ($("#" + pre + "txtContent").val() == '') {
            $().toastmessage('showErrorToast', "Bạn phải Nội dung...");
            return false;
        }
        return true;
    }
</script>
<div class="boxPro">
	<div class="boxNew_header">Liên hệ chúng tôi</div>
    <table width="100%" class="tblPay">
        <tr>
            <td class="tdTitle">Tên của bạn:</td>
            <td class="tdInput"><asp:TextBox ID="txtName" runat="server" CssClass="txtInput"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="tdTitle">Email:</td>
            <td class="tdInput"><asp:TextBox ID="txtEmail" runat="server" CssClass="txtInput"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="tdTitle" style="vertical-align:top">Nội dung:</td>
            <td class="tdInput"><asp:TextBox ID="txtContent" runat="server" CssClass="areaInput" TextMode="MultiLine" Rows="20"></asp:TextBox></td>
        </tr>
        
        <tr>
            <td></td>
            <td>
                <asp:Button ID="btnSubmit" runat="server" Text="Gửi đi" CssClass="btnInput submitType" OnClientClick="return chkSubmit();"/>
                <input type="button" value="Quay lại" class="btnInput cancelType" onclick="history.go(-1);" />
            </td>
                
        </tr>
    </table>
</div>
</asp:Content>
